home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
programs
/
misc
/
vmm
/
installvmm
< prev
next >
Wrap
Text File
|
1995-02-13
|
11KB
|
332 lines
; VMM Installer script by Martin Apel
(set @app-name "VMM")
(welcome " Welcome to the VMM installation\n\n"
" Virtual Memory for Amigas with a 68030 or 68040\n\n"
" Copyright 1993/94 by Martin Apel\n\n"
"Novice installs everything except the developer files.\n"
"Advanced installs everything without confirmation.\n"
"Expert installs everything with confirmation of all actions.\n")
(if (= 0 @user-level) ; then
(set install_level %0111)
;else
(set install_level (askoptions (prompt "What do you want to install ?")
(help @askoptions-help)
(choices "VMM" "Icons" "Documents" "Developer files")))
)
(set def_help "\n\nIf you need more help, please refer to \"VMM.guide\"\n\n")
(set my_level @user-level)
(user 2)
(set vmmdest
;get destination directory for "VMM"
(askdir (prompt "Select the directory where you want to put the VMM executable.")
(help "This should be a directory where you can easily access VMM "
"via Workbench or CLI/Shell." def_help
@askdir-help)
(default @default-dest)
(disk)
)
)
(user my_level)
(set copy_vmm (BITAND %0001 install_level))
(set copy_icons (BITAND %0010 install_level))
(set copy_docs (BITAND %0100 install_level))
(set copy_dev (BITAND %1000 install_level))
; Copy VMM files
(if copy_vmm
(
(set @default-dest vmmdest)
(set vmmtacked (tackon vmmdest "VMM"))
; ask, if we want to overwrite the old VMM if it exists
(set overwrite 1)
(if (exists "L:VMM-Handler")
(
(set old_version (getversion "l:VMM-Handler"))
(set old_ver (/ old_version 65536))
(set old_rev (- old_version (* old_ver 65536)))
(set new_version (getversion "l/VMM-Handler_4K"))
(set new_ver (/ new_version 65536))
(set new_rev (- new_version (* new_ver 65536)))
(set overwrite (askbool (prompt "\nYou have VMM "
old_ver "." old_rev " already installed"
".\nDo you wish to overwrite it with VMM "
new_ver "." new_rev " ?\n")
(help def_help @askbool-help)
(default 1)
(choices "Yes" "No"))
)
)
)
(if overwrite
(
; detect the pagesize (4K or 8K)
(set pagesize (run "ShowPageSize"))
(select pagesize
(abort "Internal error in Installer script")
((set info_string "A pagesize of 4K is usable on your system")
(set default_choice 0))
((set info_string "A pagesize of 8K is usable on your system")
(set default_choice 1))
((set info_string "Either pages of 4K or 8K are usable on your system")
(set default_choice 0))
)
(set my_choice (askchoice (prompt "\nPlease select the pagesize:\n\n"
info_string ".\n")
(help def_help @askchoice-help)
(choices "4K pagesize" "8K pagesize")
(default default_choice))
)
(select my_choice
(set sizestr "4K")
(set sizestr "8K")
)
; copy the new VMM file to the destination directory
(if copy_icons
; then
(copyfiles (prompt ("\nCopying VMM to %s." vmmdest))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "")
(choices "VMM" "VMMStat")
(dest vmmdest)
(infos)
(confirm)
)
; else
(copyfiles (prompt ("\nCopying VMM to %s." vmmdest))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "")
(choices "VMM" "VMMStat")
(dest vmmdest)
(confirm)
)
)
; copy the new VMM-Handler file to l: and rename it as "VMM-Handler"
(set handler_name (cat "l/VMM-Handler_" sizestr))
(copyfiles (prompt "\nCopying VMM-Handler to l:.")
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source handler_name)
(dest "l:")
(newname "VMM-Handler")
(confirm)
)
)
)
; ask, if we want to overwrite the old preferences file
; default: do overwrite preferences file
(set overwrite 1)
(if (exists "envarc:VMM.prefs")
(if (= 0 (askbool (prompt "\nYou have a preferences file already installed.\nDo you wish to overwrite it ?\n\n")
(help def_help @askbool-help)
(default 0)
(choices "Yes" "No"))
(set overwrite 0)
))
)
(if overwrite
(
; copy the new preferences file to env: and envarc:
(copyfiles (prompt ("\nCopying VMM.prefs to env:\n"))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "env/VMM.prefs")
(dest "env:")
(confirm)
)
(copyfiles (prompt ("\nCopying VMM.prefs to envarc:\n"))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "env/VMM.prefs")
(dest "envarc:")
(confirm)
)
)
)
)
)
; Copy docs
(if copy_docs
(
;get destination directory for "VMM.guide"
(set doc_dir (tackon vmmdest "doc"))
(if (AND (= 0 @user-level) (NOT (exists doc_dir)))
; then
(makedir doc_dir (infos))
)
(set vmmdocs
(askdir (prompt "Select the directory where you want to put\nthe documents and guides.")
(help "This should be the directory where you normally put your guides.\n\n"
def_help @askdir-help)
(default doc_dir)
(newpath)
(disk)
)
)
(if copy_dev
(if copy_icons
; then
(copyfiles (prompt ("\nCopying docs..."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "doc")
(choices "VMM.guide" "VMM_lib.doc")
(dest vmmdocs)
(infos)
(confirm)
)
; else
(copyfiles (prompt ("\nCopying docs..."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "doc")
(choices "VMM.guide" "VMM_lib.doc")
(dest vmmdocs)
(confirm)
)
)
; else
(if copy_icons
; then
(copyfiles (prompt ("\nCopying VMM.guide to " vmmdocs "."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "doc")
(choices "VMM.guide")
(dest vmmdocs)
(infos)
(confirm)
)
; else
(copyfiles (prompt ("\nCopying VMM.guide to " vmmdocs "."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "doc")
(choices "VMM.guide")
(dest vmmdocs)
(confirm)
)
)
)
)
)
; Copy developer files
(if copy_dev
(
(copylib (prompt ("\nCopying VMM.library to libs:."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "Developer/libs/VMM.library")
(dest "libs:")
(confirm)
)
(if (exists ("fd:") (noreq))
; then
(set fd_dir "fd:")
; else
(set fd_dir
(askdir (prompt "Select the directory where you want to put the fd file.")
(help def_help @askdir-help)
(default "WORK:")
(disk)
)
)
)
(if (exists ("include:") (noreq))
; then
(set inc_dir "include:")
; else
(set inc_dir
(askdir (prompt "Select the directory where you want to put the include file.")
(help def_help @askdir-help)
(default "WORK:")
(disk)
)
)
)
(if (exists ("lib:") (noreq))
; then
(set lib_dir "lib:")
; else
(set lib_dir
(askdir (prompt "Select the directory where you want to put the lib file.")
(help def_help @askdir-help)
(default "WORK:")
(disk)
)
)
)
(copyfiles (prompt ("\nCopying VMM_lib.fd to " fd_dir "."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "Developer/fd/VMM_lib.fd")
(dest fd_dir)
(confirm)
)
(copyfiles (prompt ("\nCopying VMM_stat.h to " inc_dir "."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "Developer/include/VMM_Stat.h")
(dest inc_dir)
(confirm)
)
(copyfiles (prompt ("\nCopying VMM_lib.lib to " lib_dir "."))
(help def_help @copyfiles-help)
(optional "oknodelete")
(optional "askuser")
(source "Developer/lib/VMM_lib.lib")
(dest lib_dir)
(confirm)
)
)
)